# -*- coding: utf-8 -*-
'''
Created on 2017年2月3日

@author: wangjunjie
'''
class Person(object):
    pass

p1 = Person()
p1.name = 'Ming'
p1.gender = 'Male'
p1.birth = '1990-1-1'
p2 = Person()
p2.name = 'Bong'
p2.school = 'No. 1 High School'
p2.grade = 2
print p1
print p2
print p1 == p2
p3 = Person()
p3.name = 'Aong'


L1 = [p1,p2,p3]
l2 = sorted(L1,lambda p1,p2 :cmp(p1.name, p2.name))
for person in l2:
    print '按照名字排序：',person.name


